DROP PROCEDURE IF EXISTS CREATE_Trigger;
DELIMITER $$

CREATE PROCEDURE CREATE_Trigger()
BEGIN
<#list TriggerMySQL as t>
    <#if t.getMySQL()??>
        BEGIN
        DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
        BEGIN
        GET CURRENT DIAGNOSTICS CONDITION 1 @errno = MYSQL_ERRNO, @msg = MESSAGE_TEXT;
        select @errno,@msg;
        END;
        ${t.getMySQL()};
        END;
    </#if>
</#list>
END;
CALL CREATE_Trigger;
DROP PROCEDURE CREATE_Trigger;

$$
